﻿<Application x:Class="WadViewer.WinApp.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
						 xmlns:d="clr-namespace:WadViewer.DomainModel;assembly=WadViewer.DomainLayer"
						 xmlns:l="clr-namespace:WadViewer.WinApp"
             StartupUri="MainWindow.xaml">
	<Application.Resources>
		<l:WadDataTemplateSelector x:Key="TemplateSelector" />
		<Style x:Key="LargeText" TargetType="TextBlock">
			<Setter Property="FontSize" Value="14" />
			<Setter Property="Margin" Value="4" />
		</Style>
		<DataTemplate x:Key="NothingTemplate">
			<TextBlock>Please select log</TextBlock>
		</DataTemplate>
		<DataTemplate DataType="{x:Type d:WadTraceLogEntity}" x:Key="TraceLogTemplate">
			<Grid >
				<Grid.RowDefinitions>
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition />
				</Grid.ColumnDefinitions>
				<TextBlock>Timestamp:</TextBlock>
				<TextBlock Text="{Binding Timestamp}" Grid.Column="1"/>
				<TextBlock Grid.Row="1">Role:</TextBlock>
				<TextBlock Grid.Row="1" Text="{Binding Role}" Grid.Column="1"/>
				<TextBlock Grid.Row="2">RoleInstance:</TextBlock>
				<TextBlock Grid.Row="2" Text="{Binding RoleInstance}" Grid.Column="1"/>
				<TextBlock Grid.Row="3">Message:</TextBlock>
				<TextBlock Grid.Row="3" Text="{Binding Message}" Grid.Column="1"/>
			</Grid>
		</DataTemplate>
		<DataTemplate DataType="{x:Type d:WadEventLogEntity}" x:Key="EventLogTemplate">
			<Grid >
				<Grid.RowDefinitions>
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition />
				</Grid.ColumnDefinitions>
				<TextBlock>Timestamp:</TextBlock>
				<TextBlock Text="{Binding Timestamp}" Grid.Column="1"/>
				<TextBlock Grid.Row="1">Role:</TextBlock>
				<TextBlock Grid.Row="1" Text="{Binding Role}" Grid.Column="1"/>
				<TextBlock Grid.Row="2">RoleInstance:</TextBlock>
				<TextBlock Grid.Row="2" Text="{Binding RoleInstance}" Grid.Column="1"/>
				<TextBlock Grid.Row="3">Provider:</TextBlock>
				<TextBlock Grid.Row="3" Text="{Binding ProviderName}" Grid.Column="1"/>
				<TextBlock Grid.Row="4">Channel:</TextBlock>
				<TextBlock Grid.Row="4" Text="{Binding Channel}" Grid.Column="1"/>
				<TextBlock Grid.Row="5">Description:</TextBlock>
				<TextBlock Grid.Row="5" Text="{Binding Description}" Grid.Column="1"/>
				<TextBlock Grid.Row="6">RawXml:</TextBlock>
				<TextBlock Grid.Row="6" Text="{Binding RawXml}" Grid.Column="1"/>
			</Grid>
		</DataTemplate>
		<DataTemplate DataType="{x:Type d:WadPerfCounterEntity}" x:Key="PerfCounterTemplate">
			<Grid >
				<Grid.RowDefinitions>
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
					<RowDefinition />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition />
				</Grid.ColumnDefinitions>
				<TextBlock>Timestamp:</TextBlock>
				<TextBlock Text="{Binding Timestamp}" Grid.Column="1"/>
				<TextBlock Grid.Row="1">Role:</TextBlock>
				<TextBlock Grid.Row="1" Text="{Binding Role}" Grid.Column="1"/>
				<TextBlock Grid.Row="2">RoleInstance:</TextBlock>
				<TextBlock Grid.Row="2" Text="{Binding RoleInstance}" Grid.Column="1"/>
				<TextBlock Grid.Row="3">CounterName:</TextBlock>
				<TextBlock Grid.Row="3" Text="{Binding CounterName}" Grid.Column="1"/>
				<TextBlock Grid.Row="4">CounterValue:</TextBlock>
				<TextBlock Grid.Row="4" Text="{Binding CounterValue}" Grid.Column="1"/>
			</Grid>
		</DataTemplate>
	</Application.Resources>
</Application>
